<?php
/**
 * Copyright 2009 Joe Dotoff
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * @package     PDog
 * @subpackage  UnitTests
 * @author      Joe D. <nonultimate@gmail.com>
 * @license     Apache License Version 2.0
 * @version     $Id: AllTests.php 33 2009-04-21 01:03:44Z nonultimate $
 */
// Set error level to scrict
error_reporting(E_ALL | E_STRICT);
set_include_path(get_include_path(). PATH_SEPARATOR . '../lib');

// Require PHPUnit test framework
require_once 'PHPUnit/Util/Filter.php';

PHPUnit_Util_Filter::addFileToFilter(__FILE__);

if (!defined('PHPUnit_MAIN_METHOD')) {
    define('PHPUnit_MAIN_METHOD', 'AllTests::main');
}

require_once 'PHPUnit/Framework/TestSuite.php';
require_once 'PHPUnit/TextUI/TestRunner.php';

// Require test suites
require_once 'Http/AllTests.php';
require_once 'Socket/AllTests.php';

class AllTests
{
    public static function main()
    {
        PHPUnit_TextUI_TestRunner::run(self::suite());
    }

    public static function suite()
    {
        $suite = new PHPUnit_Framework_TestSuite('PDog');

        $suite->addTest(PDog_Http_AllTests::suite());
        $suite->addTest(PDog_Socket_AllTests::suite());

        return $suite;
    }
}

if(PHPUnit_MAIN_METHOD == 'AllTests::main') {
    AllTests::main();
}
?>